

//
//  CBXNetworkTool.m
//  车信帮3.0
//
//  Created by 刘春艳 on 16/6/15.
//  Copyright © 2016年 lifuli. All rights reserved.
//

#import "CBXNetworkTool.h"
#import "XXTEA.h"

@implementation CBXNetworkTool
+ (instancetype)sharedNetworkTool {
    static CBXNetworkTool *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
    instance = [[self alloc] init];
        instance.requestSerializer = [AFJSONRequestSerializer serializer];
        // 修改响应解析器能够解析的数据类型
        instance.responseSerializer=[AFHTTPResponseSerializer serializer];
        instance.requestSerializer.timeoutInterval = 10;
    });
    return instance;
}
+(NSString *)timeString
{
  
    NSString *dateStr = @"198412280000";
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"yyyyMMddHHmm"];
    [formatter setTimeZone: [NSTimeZone timeZoneWithName:@"Asia/Chongqing"]];
    NSDate *baseDate = [formatter dateFromString:dateStr];
    NSTimeInterval time =[[NSDate date]timeIntervalSinceDate:baseDate];
    NSString *times =  [NSString stringWithFormat:@"%.f",time*1000];
    return times;
}



@end
